Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SkeletonIK3D get/set_interpolation compat from #87888 #90780

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

lyuma
Copy link
Contributor

@lyuma lyuma commented Apr 17, 2024

Adds both SkeletonIK3D functions mentioned in issue #90303

interpolation was moved to influence, so the compat methods forward to the influence getter/setter.

@lyuma lyuma requested a review from a team as a code owner April 17, 2024 04:46
scene/3d/skeleton_ik_3d.h Outdated Show resolved Hide resolved
@dsnopek
Copy link
Contributor

dsnopek commented Apr 17, 2024

This should also remove these lines from 4.2-stable.expected:

Validate extension JSON: API was removed: classes/SkeletonIK3D/methods/get_interpolation
Validate extension JSON: API was removed: classes/SkeletonIK3D/methods/set_interpolation

We shouldn't need to ignore those messages with the new compatibility methods

@dsnopek dsnopek requested a review from a team April 17, 2024 12:49
@akien-mga akien-mga changed the title Add SkeletonIK3D get/set_interpolation compat from #87888 Add SkeletonIK3D get/set_interpolation compat from #87888 Apr 17, 2024
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from David's comment, looks good to me.

@lyuma
Copy link
Contributor Author

lyuma commented Apr 18, 2024

I tried removing the two lines as @dsnopek asked, but now it's complaining that the APIs I am adding i this PR were removing.

Any extension API experts out there able to figure out what I did wrong?

@akien-mga
Copy link
Member

akien-mga commented Apr 18, 2024

Those methods (and the property) actually need to be readded as normal methods, not as compat methods. Compat methods are for when we break compat by changing a method prototype.

Here, the old method bindings should just be brought back, but the implementation of these methods now defers to the new influence method.

Remember to also add the property back, and remove its line from the .expected file. And then in the doc XML, you can mark the property as deprecated.

All relevant code should be enclosed in #ifndef DISABLE_DEPRECATED.

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great now, should pass checks.

@lyuma
Copy link
Contributor Author

lyuma commented Apr 18, 2024

I used PROPERTY_USAGE_NONE for the deprecated property, so it hopefully won't show in the inspector or get saved. Is that correct?

@akien-mga
Copy link
Member

Yeah that sounds good to me.

@akien-mga akien-mga merged commit be9b298 into godotengine:master Apr 18, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants